#include <cstdio>
#include <cmath>

int main(int argc, char const *argv[]) {
    int input_num;
    while (scanf("%d", &input_num) != EOF) {
        int pow_num = pow(input_num, 2);
        int buf_data_a[10000], buf_data_b[10000];
        int size_a = 0, size_b = 0;
        while (input_num != 0) {
            buf_data_a[size_a++] = input_num % 10;
            input_num /= 10;
        }
        while (pow_num != 0) {
            buf_data_b[size_b++] = pow_num % 10;
            pow_num /= 10;
        }
        bool is_yes = true;
        for (int i = 0; i < size_a; i++) {
            if (buf_data_a[i] != buf_data_b[i]) {
                is_yes = false;
                break;
            }
        }
        if (is_yes)
            printf("Yes!\n");
        else
            printf("No!\n");
    }
    return 0;
}
